package Cliente.Modelo;

/**
 * @author Angel Lopez
 */
public class BoardPlaying {
    private int id_game;
    
    private int round;
    private int player_turn;

    private int roll_dice1;
    private int roll_dice2;
    
    private String message;

    private int p1_position;
    private int p2_position;
    private int p3_position;
    private int p4_position;
    private int p5_position;
    private int p6_position;
    private int p7_position;
    private int p8_position;

    public BoardPlaying() {
        
        round = 0;
        player_turn =0;
        
        roll_dice1 = 0;
        roll_dice2 = 0;
        
        
        p1_position = 0;
        p2_position = 0;
        p3_position = 0;
        p4_position = 0;
        p5_position = 0;
        p6_position = 0;
        p7_position = 0;
        p8_position = 0;
        
    }
    
    public BoardPlaying(int id_game) {
        this();
        this.id_game = id_game;
    }


    
    public void modificate_board(int round, int player_turn, int position, int roll_dice1, int roll_dice2, String message){

        this.round = round;
        this.player_turn = player_turn;
        this.roll_dice1 = roll_dice1;
        this.roll_dice2 = roll_dice2;
        this.message = message;
        
        switch(player_turn){
            case 1: this.p1_position = position; break;
            case 2: this.p2_position = position; break;
            case 3: this.p3_position = position; break;
            case 4: this.p4_position = position; break;
            case 5: this.p5_position = position; break;
            case 6: this.p6_position = position; break;
            case 7: this.p7_position = position; break;
            case 8: this.p8_position = position; break;
            default: //nothing; 
        }
        //this.message = ("Round " + round + " - Player turn " + player_turn + " Roll " + (roll_dice1+roll_dice2));
    }
    
    public void modificate_board(int round, int player_turn){
        this.round = round;
        this.player_turn = player_turn;
        //this.message = ("Round " + round + " - Player turn " + player_turn + " NO ROLL DICE");
    }
    
   public int dame_casilla(int turno_jugador){
        switch(turno_jugador){
            case 1: return p1_position;
            case 2: return p2_position;
            case 3: return p3_position;
            case 4: return p4_position;
            case 5: return p5_position;
            case 6: return p6_position;
            case 7: return p7_position;
            case 8: return p8_position;
            default: return 0;
            
        } 
    }
    

    public int getId_game() {
        return id_game;
    }

    public int getRound() {
        return round;
    }

    public int getPlayerTurn() {
        return player_turn;
    }

    public int getRoll_dice1() {
        return roll_dice1;
    }

    public int getRoll_dice2() {
        return roll_dice2;
    }
    
    public String getMessage(){
        return message;
    }

    //SETTERS CREADOS POR JORGE PARA PRUEBAS
    public void setId_game(int id_game) {
        this.id_game = id_game;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setP1_position(int p1_position) {
        this.p1_position = p1_position;
    }

    public void setP2_position(int p2_position) {
        this.p2_position = p2_position;
    }

    public void setP3_position(int p3_position) {
        this.p3_position = p3_position;
    }

    public void setP4_position(int p4_position) {
        this.p4_position = p4_position;
    }

    public void setP5_position(int p5_position) {
        this.p5_position = p5_position;
    }

    public void setP6_position(int p6_position) {
        this.p6_position = p6_position;
    }

    public void setP7_position(int p7_position) {
        this.p7_position = p7_position;
    }

    public void setP8_position(int p8_position) {
        this.p8_position = p8_position;
    }

    public void setPlayer_turn(int player_turn) {
        this.player_turn = player_turn;
    }

    public void setRoll_dice1(int roll_dice1) {
        this.roll_dice1 = roll_dice1;
    }

    public void setRoll_dice2(int roll_dice2) {
        this.roll_dice2 = roll_dice2;
    }

    public void setRound(int round) {
        this.round = round;
    }

    
    

 
}